package com.xunwulian.base.dao;

import com.xunwulian.base.entity.AppEntity;
import com.xunwulian.base.entity.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import javax.validation.constraints.NotNull;
import java.util.List;

@Mapper
public interface AppDao {

    Integer save(@Param("entity") AppEntity entity);

    void delete(@Param("appId") String appId);

    void edit(@Param("appId") String appId, @Param("appName") String appName);

    AppEntity getById(@NotNull @Param("appId") String appId);

    List<AppEntity> listPageByAll(@Param("page") Page page);

    List<AppEntity> listAll();
}
